package floappcontest.core.beans;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

import floappcontest.core.beans.interfaces.PersistentObject;
import org.apache.myfaces.custom.fileupload.UploadedFile;

@Entity
@Table( name = "file" )
public class FloappFile implements PersistentObject, Serializable {

	
	private static final long serialVersionUID = 1L;

	private UploadedFile upFile;
	
	private String fileName;

	public FloappFile(){
		//
	}
	
	public FloappFile(UploadedFile upFile, String fileName) {
		super();
		this.upFile = upFile;
		this.fileName = fileName;
	}
	
	@Lob
	@Column( name = "file",nullable = false )
	public UploadedFile getUpFile() {
		return upFile;
	}

	public void setUpFile(UploadedFile upFile) {
		this.upFile = upFile;
	}

	@Id
	@Column( name = "file_name",nullable = false )
	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	
	
}
